package com.quasar.hpatient.utils;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;

import com.quasar.hpatient.MainAppliaction;
import com.quasar.hpatient.model.event.CloseEvent;
import com.quasar.hpatient.view.MainActivity;
import com.quasar.hpatient.view.MainActivity_;
import com.quasar.hpatient.view.friends.FriendsListActivity_;
import com.quasar.hpatient.view.friends.NewsFriendActivity_;
import com.quasar.hpatient.view.prescription.AtPrescriptionActivity_;
import com.quasar.hpatient.view.prescription.PharmacyRecordActivity_;
import com.quasar.hpatient.view.record.TestRecordActivity_;
import com.vise.log.ViseLog;

import org.greenrobot.eventbus.EventBus;


/**
 * author : 许建宏
 * Date: 2017/12/8 0008
 * View: 根据消息跳转界面
 */

public class MsgJumpView {

    static String view = "1";
//    Map<String, String> jpshMap= MainAppliaction.getInstance().jpshMap();

    public static void JumpView(Context context, String Code, String DataTime) {

        switch (Code) {
            case "0":

                break;

            case "1"://患者申请医生

                break;

            case "2"://医生同意患者
                MainActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).Viewid(view).start();
                break;


            case "3"://医生拒绝患者
                MainActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).Viewid(view).start();
                break;

            case "4":

                break;


            case "5":

                break;


            case "6"://医生关注患者
                MainActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).Viewid(view).start();
                break;

            case "7"://患者给医生提交化验单

                break;


            case "8"://医生给患者诊断
                //化验单界面

                ViseLog.d("医生给患者诊断信息" + DataTime);
                TestRecordActivity_.intent(context).TestTime(DataTime).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;

            case "9":
                //当前药单
                AtPrescriptionActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;

            case "10":
                //调药记录
                PharmacyRecordActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;
            case "11"://医生给患者添加用药
                AtPrescriptionActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;

            case "12"://医生修改患者药单
                AtPrescriptionActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;


            case "13"://医生删除患者药单
                AtPrescriptionActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();

                break;

            case "14"://来院复诊
                MainActivity_.intent(context).VisitView(DataTime).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;
            //好友申请消息
            case "15":
                NewsFriendActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;


            //好友同意
            case "16":

                break;


            //好友拒绝
            case "17":
//                FriendsListActivity_.intent(context).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;

            case "20"://医生修改患者化验单信息
                TestRecordActivity_.intent(context).TestTime(DataTime).flags(Intent.FLAG_ACTIVITY_NEW_TASK).start();
                break;
        }
    }
}
